﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
namespace SQT.tracnghiem.Admin.SystemSettings.Control.Ajax.Menu
{
    public partial class Menu_edit_form : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        public int get_parent(int id)
        {
            var parent = new TblAdminMenuController().FetchAll().Where(x => x.AmId == id).Single();
            if (parent.AmParentID == 0)
                return id;
            else
                return get_parent((int)parent.AmParentID);
        }
    }
}